<!DOCTYPE html>
<html>

	<head>
		<!-- 声明文档使用的字符编码 -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<!-- 为移动设备添加 viewport -->
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
		<!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
		<meta name="HandheldFriendly" content="true">
		<!-- 优先使用 IE 最新版本和 Chrome -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

		<title>黑图视界</title>
		<meta name="keywords" content="黑图视界">
		<meta name="description" content="黑图视界">
		<script type="text/javascript" src="../js/setFontSize.js"></script>
		<link rel="stylesheet" href="../css/swiper.min.css" />
		<link rel="stylesheet" href="../css/main.css" />
		<link rel="shortcut icon" href="../img/personIcon2.jpg">
	</head>

	<body>
		<div id="app">
			<main class="pab100">
				<section class="yudingForm picBg">
					<div class="container">
						<div class="pad30 whiteBg radius20 pab80">
							<h3 class="title">{{activity.activityname}}</h3>
							<label class="item clearfix">
								<div class="name">选择日期</div>
								<input class="formInput" type="text" id="dateSelect">
							</label>
							<label class="item clearfix" style="display: none">
								<div class="name">选择时间</div>
								<input class="formInput" type="text" id="timeSelect" value="12200000" readonly="readonly" >
							</label>
							<label class="item clearfix" style="display: none">
								<div class="name">选择时间段</div>
								开始时间
								<input type="time" value="00:00" id="Tim1" @change="Times1"/>
								结束时间
								<input type="time" value="12:00" id="Tim2"  @change="Times2"/>
							</label>

							<label class="item clearfix" style="display: none">
								<div class="name">电话号码</div>
								<input type="text" class="formInput" value="13157061598"  id="mobile"/>
							</label>
							<label class="item clearfix">
								<div class="name">预订内容</div>
								<textarea class="formText" id="content" v-model="activity.introduce"  readonly="readonly"></textarea>
							</label>
							<div class="subBtn"  @click="ToOrd(activity.id)">确认</div>
						</div>
					</div>
				</section>
			</main>
		</div>

		<script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="../js/swiper.min.js"></script>
		<script type="text/javascript" src="../js/layer/layer.js" ></script>
		<script type="text/javascript" src="../js/Mdate.js"></script>
		<script type="text/javascript" src="../js/iScroll.js"></script>
		<script type="text/javascript" src="../js/rolldate.js"></script>
		<script type="text/javascript" src="../js/main.js"></script>
		<script src="../js/vue.js"></script>
		<script src="../js/axios.js"></script>
		<script src="../js/getParameter.js"></script>
		<script>
			let app4=new Vue({
				el:"#app",
				data:{
					activity:{},
					activityschedule:{}
				},
				methods:{
					ToOrd(id){
						let x=$("#Tim1").val();
						let y=$("#Tim2").val();
						console.log(x)
						console.log(y)
						// console.log("qqq"+date2)
						console.log(typeof x)
						console.log(x>y)

						if (x>y){
							alert("时间选择错误！")
							console.log("时间选择错误!")
							// location.href="yudingForm.html"
							window.location.reload();
						}else {
							let date= $("#dateSelect").val();
							location.href="yudingOrder.html?id="+id+"&date="+date;
						}

						const _this=this;

						let x1=getParameter(x)
						let y2=getParameter(y)

						console.log(_this.activityschedule)

					},
					Times1(){
						console.log("进来了")
						const _this=this;

					},
					Times2(){
						console.log("进来了")
						const _this=this;

					},

				},
				created: function () {
					const _this = this;
					let aid = getParameter("id");

					console.log(aid + "aid")
					axios.get("/activity/queryById",
							{params: {id: aid}})
							.then(function (response) {
								_this.activity = response.data;
							});
					axios.get("/activity/selectedAS",
							{params:{id:aid}})
							.then(function (response) {
								_this.activityschedule=response.data;
							})

				}
			})
		</script>

	</body>

</html>